<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var a = ['a', 'b', 'c'];
        var val=a.reverse(); // ["c", "b", "a"]
        console.log(val);
        

        var str="hello world";
        var myArr=str.split();
        myArr.reverse;
        console.log(myArr.join(""));
    </script>
</body>

</html>